package com.wlf.netty.nio;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

public class NIOFileChannelRead {
    public static void main(String[] args) throws Exception {
        File file = new File("\"C:\\\\Users\\\\jessi\\\\Desktop\\\\github\\\\test\\\\001.txt\"");
        FileInputStream fileInputStream = new FileInputStream(file);
        FileChannel channel = fileInputStream.getChannel();

        ByteBuffer buffer = ByteBuffer.allocate((int) file.length());
        channel.read(buffer);


    }
}
